<?php 

  header("content-type:text/html;charset=utf-8");
   // $arr = array(
   //     "name"  => "梁桂源",
   //     "name1" => "梁桂源1",
   //     "name2" => "梁桂源2",
   //     "name3" => "梁桂源3",
   //     "name4" => "梁桂源4"
   // 	);

   // $i=0;
   // while ($i<count($arr)) {
   // 	   var_dump(key($arr));
   // 	   var_dump(current($arr));
   // 	   next($arr);
   // 	   $i++;
   // }


    $arr = array(
	    	    "ASKJAD"=>1321,
	    	    "asdh"=>546,
	    	    "auifhueA"=>45465,
	    	    "auifhueB"=>array(
					    	    	"asdh4"=>array(
							    	    		   "ASKJAD"=>1321,
										    	   "asdh"=>546,
										    	   "auifhueA"=>45465,
							    	    		),
					    	    	"SDFNSJ"=>array(
							    	    		   "ASKJAD"=>1321,
										    	   "asdh"=>546,
										    	   "auifhueA"=>45465,
							    	    		),
					    	    	"ETIEaa"=>array(
							    	    		   "ASKJAD"=>1321,
										    	   "asdh"=>546,
										    	   "auifhueA"=>45465,
							    	    		)
						    	 ),

    	       );
      function changeCase ($arr,$case="up") {
          $newArr = array();
          foreach ($arr as $k => $v) {
          	  if($case=="up"){
      	  	 	  $newArr[strtoupper($k)]=$v;
          	  }elseif($case=="lower"){
          	  	$newArr[strtolower($k)]=$v;
          	  }
          	  if(is_array($v)){
          	  	 changeCase($v,$case);
          	  }
          }
         return $newArr;
      }
      print_r(changeCase($arr));














 